package org.example.test.service.impl;

import org.example.test.entity.Dept;
import org.example.test.mapper.DeptMapper;
import org.example.test.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class DeptServiceImpl implements DeptService {
    @Autowired
    private DeptMapper deptMapper;
    @Override
    public List<Dept> findAll(String dname) {
        return deptMapper.findAll(dname);
    }

    @Override
    public int delete(Integer deptno) {
        return deptMapper.delete(deptno);
    }

    @Override
    public int editDept(Dept dept) {
        return deptMapper.editDept(dept);
    }

    @Override
    public int addDept(Dept dept) {
        return deptMapper.addDept(dept);
    }
}
